# This code is part of the MWP System
# Copyright (c) 2012 Benjamin Lubin (blubin@bu.com) 
# Published under and subject to the GPLv2 license available at http://www.gnu.org/licenses/gpl-2.0.html

'''
Created on Dec 14, 2012
@author: blubin
'''

from frontend.roleApplication import RoleApplication;
from frontend.form import Type;
from unique import UNIQUE;

class ClientApplication(RoleApplication):
    """ The Client User Interface """

    def __init__(self):
        super(ClientApplication, self).__init__("RentSubsidy"+UNIQUE, "Client");
        self.register_source_step("SubmitInfo", self.submit_info_form_creator);

    def submit_info_form_creator(self, stepname, form):
        form.add_html_label('<B>Please enter your information:</B>')
        form.add_field(Type.SHORTSTRING, "FirstName", labeltext="First Name", initial="First");
        form.add_field(Type.SHORTSTRING, "LastName", labeltext="Last Name", initial="Last");
        form.add_field(Type.SHORTSTRING, "Address", initial="Address Here");
        form.add_static_label("Monthly Income Information:");
        form.add_field(Type.CURRENCY, "EarnedIncome", labeltext="Earned Income", initial=0);
        form.add_field(Type.CURRENCY, "CashBenefits", labeltext="Cash Benefit", initial=0);
        form.add_field(Type.CURRENCY, "RentPayable", labeltext="Rent Payable", initial=0);
        
if __name__ == '__main__':
    app = ClientApplication();
    app.MainLoop();